<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="keywords" content="" />
	<meta name="description" content="" />
	<title>重置密码</title>
    <script type="text/javascript" src="../public/maincss.js"></script>
	<link href="../css/forgetpasswd.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="../public/main.js"></script> 
    <style>  
	.tishi1{color:#09f; position:absolute; left:32%; top:51%;}
	</style>
</head>
<body>
<!--头部开始-->
<div id="header"></div>
<!--头部结束-->
<div class="shoppingcart_center">
  <div class="shoppingcart_center3bg">
    <div class="shoppingcart_center2">
      <div class="getpass_center">
        <div class="getpass_center_lc">
          <p class="p3"></p>
          <ul>
            <li class="on">输入会员名</li>
            <li class="on">验 证</li>
            <li class="on">重置密码</li>
            <li>完 成</li>
            <div class="clear"></div>
          </ul>
        </div>
        <div class="getpass_center_m1" style="width:500px;">
          <form method="post" id="login" name="F1" action="">
	          <ul>
	            <li class="li1">会员名：&nbsp;&nbsp;&nbsp;</li>
	            <li class="li2" style="color:#F96;line-height:38px;font-size:25px;" id="userName"></li>
	            <div class="clear"></div>
	          </ul>
              <ul>
	            <li class="li1">新密码：&nbsp;&nbsp;&nbsp;</li>
	            <li class="li2"><input name="user_account.userName" type="password" placeholder="请输入密码" id="usrPassConfirm"/><span class="tishi1">请输入6-16位密码，由字母+数字+特殊符号组成，例：abc!@123</span></li>
	            <li class="register_msg msg1 dh" id="usrPassConfirm_li"></li>
	            <div class="clear"></div>
	          </ul>
              <ul style="margin:45px -2px">
	            <li class="li1">确认密码：</li>
	            <li class="li2"><input name="user_account.userName" type="password" placeholder="请重新输入密码" id="password"/></li>
	            <li class="register_msg msg1 dh" id="password_li"></li>
	            <div class="clear"></div> 
	          </ul>
	          <div class="btn"><input type="button" value="确认重置" onclick="resetPwd()"/></div>
	          <div class="clear"></div>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>
<!--底部开始-->
<div id="footer"></div>
<!--底部结束-->
<script type="text/javascript">
var userName = request("uname"); 
var checkcode = request("checkcode");
$(function () {
	$("#userName").text(userName);
	$("#usrPassConfirm_li").hide();
	$("#password_li").hide();
});

function resetPwd() {
	var usrPassConfirm = $("#usrPassConfirm").val();
	var password = $("#password").val();
	if ($.trim(usrPassConfirm) == "" || !CndnsValidate.checkPassWord(usrPassConfirm)) {
		$("#usrPassConfirm_li").text("密码不符合要求"); 
		$("#usrPassConfirm_li").show();
        return false;
    }else{
    	$("#usrPassConfirm_li").text(""); 
		$("#usrPassConfirm_li").hide();
    }
    if($.trim(password) == "" || password != usrPassConfirm){
    	$("#password_li").text("两次密码输入不一致"); 
		$("#password_li").show();
		return false;
    }else{
    	$("#password_li").text("");  
		$("#password_li").hide();
    }
	var service = {};
	service.userName = userName;
	service.password = encodeURIComponent(password); 
	service.checkcode = checkcode;
	var fn="resetPwd";
	service = Commonjs.jsonToString(service)
	var params = Commonjs.getParams(fn,service);//获取参数
	Commonjs.ajaxTrue(weburl,params,resetPwdSuccess,true,"正在重置..."); 
}
	
function resetPwdSuccess(data){
	location.href = "./compelete.html";
}

</script>
</body>
</html>





